#include <QCoreApplication>
#include<iostream>

using namespace std;

long pow(int x,int n) //define
{
    int result=1;    //任何数的零次方都为1
    for(int i=0;i<n;i++)
    {
        result=x*result;
    }
    return result;
}

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int x,n,result;
    cout<<"input x and n:"<<endl;
    cin>>x>>n;
    result =pow(x,n);
    cout<<"result is:"<<result<<endl;

    return a.exec();
}
